fix(parser): include per-field locations for safe-output schema failures#17484
fix(parser): include per-field locations for safe-output schema failures#17484davidahmann wants to merge 1 commit intogithub:mainfrom
Conversation
|
@copilot merge main and recompile |
|
Hey Unfortunately, this PR cannot be accepted because it violates the project's core contribution policy: 🚫 Traditional pull requests are not enabled for this repository. From CONTRIBUTING.md:
The repository uses an agentic development workflow exclusively — all contributions must go through GitHub Copilot Agent. This means:
What to do insteadI can see you've already opened issue #17480 which describes the problem perfectly! That's exactly the right approach. Here's what should happen next:
The work you've done here is solid (focused changes, includes tests, references the issue), but the process matters for this project — it's dogfooding agentic workflows to build agentic workflows. Thanks for understanding, and apologies for any confusion! The CONTRIBUTING.md file explains this workflow in detail.
|
|
See #17524 |
Problem
Invalid
safe-outputsconfigs can fail schema validation without surfacing all failing fields with their source locations, which slows operator debugging and can lead to repeated edit/compile cycles.Why now
Gap item #4 tracks this as actionable operator friction in parser diagnostics, and current behavior does not consistently provide location-rich details for every schema failure.
What changed
validateWithSchemaAndLocationto aggregate all schema failures and render each with JSON path plus line/column where available.formatSchemaFailureDetail(...)helper for consistent path/location formatting.Validation
go test ./pkg/parser -run 'TestValidateWithSchemaAndLocationReportsAllSafeOutputFailures|TestSafeOutputsErrorLocationAtVariousDepths|TestSafeOutputsErrorLocationWithComplexYAML|TestSafeOutputsEdgeCases'✅make agent-finish❌ blocked by existing baseline failures inpkg/workflowgolden/git-patch tests.origin/main:go test ./pkg/workflow -shortshows same failures (TestGitPatchFromHEADCommits,TestGitPatchPrefersBranchOverHEAD,TestGitPatchNoCommits,TestWasmGolden_CompileFixtures).Refs #17480
✨ PR Review Safe Output Test - Run 22256990263